package org.dzms.services;

import java.util.List;

import org.dzms.commons.PageHandler;
import org.dzms.dao.FoodClassDAO;
import org.dzms.entity.FoodClass;

public class foodClassService {
	
	private FoodClassDAO fdao = new FoodClassDAO();
	
	//商品分页以及模糊查询
	public PageHandler findPage(int cp, String cond) {
		PageHandler pb = new PageHandler(fdao);
		pb.setCurrentPage(cp);
		pb.setCond(cond);
		return pb.findBean();
	}
	public PageHandler findPage1(int cp, String cond) {
		PageHandler pb = new PageHandler(fdao);
		pb.setCurrentPage(cp);
		pb.setCond(cond);
		return pb.findBean1();
	}
	public PageHandler findPage2(String a,int cp, String cond) {
		PageHandler pb = new PageHandler(fdao);
		pb.setCurrentPage(cp);
		pb.setCond(cond);
		return pb.findBean2(a);
	}
	public List<FoodClass> findAll() {
		return fdao.findAllFc();
	}
	
	public List<FoodClass> findSentiments(){
		return fdao.findSentiment();
	}
//	public static void main(String[] args) {
//		
//		foodClassService a=new foodClassService();
//		List<FoodClass> b=a.findSentiments();
//		for (FoodClass foodClass : b) {
//			System.out.println(foodClass);
//			
//		}
//	}
}
